//
//  DataSource.m
//  CMTableView
//
//  Created by student on 16/3/11.
//  Copyright © 2016年 niit. All rights reserved.
//


#import "DataSource.h"

@implementation DataSource

-(NSArray *)handerList{
    _viewList=[NSDictionary dictionaryWithContentsOfFile:@"/Users/student/Desktop/main/selfMain/1、CMTableView/CMTableView/足球队dictionary.plist"];
    NSArray *arr=[NSArray array];
    arr=[[self.viewList allKeys]sortedArrayUsingSelector:@selector(compare:)];
    return arr;
}



- (int)numberOfSectionsInTableView{
    return self.handerList.count;
}

- (int)numberOfRowsInSection:(int)section{
    NSString *str=self.handerList[section];
    NSArray *arr=self.viewList[str];
    return arr.count;
}

-(NSString *)contentForSection:(int)section androw:(int)row{
    NSString *str=self.handerList[section];
    NSArray *arr=self.viewList[str];
    return arr[row];
}

-(NSString *)handerInSection:(int)section{
    return self.handerList[section];
}


@end
